package com.zhehekeji.opsys.api.webservice.server;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import org.apache.cxf.rs.security.cors.CrossOriginResourceSharing;

import com.zhehekeji.opsys.api.resp.GetThemeListResp;
import com.zhehekeji.opsys.api.resp.GetThemeMovieListResp;
import com.zhehekeji.opsys.api.resp.GetThemeMovieResp;
import com.zhehekeji.opsys.api.resp.GetThemeResp;
import com.zhehekeji.opsys.api.resp.GetThemeUserListResp;
import com.zhehekeji.opsys.api.resp.LuckySignupResp;

/**
 * @ClassName ThemeManager
 * @Description 专题管理接口
 * @author chenweiliu chenwei.liu@163.com
 * @date 2016-5-25   上午10:38:18
 */
@Path(value="/")
@WebService
@CrossOriginResourceSharing(allowAllOrigins=true)
public interface ThemeManager {
	
	/**
	 * 
	* @Title: getTheme 
	* @Description: 获取专题详情
	* @param themeCode 专题编码
	* @return 
	* @return GetThemeResp 
	* @throws
	 */
	@GET
	@Path(value="getTheme")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetTheme",operationName="getTheme")
	GetThemeResp getTheme(@WebParam(name="themeCode")@QueryParam(value="themeCode")String themeCode);
	
	/**
	 * 
	* @Title: getThemeList 
	* @Description: 获取专题列表
	* @param cpCode
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetThemeListResp 
	* @throws
	 */
	@GET
	@Path(value="getThemeList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetThemeList",operationName="getThemeList")
    GetThemeListResp getThemeList(@WebParam(name="cpCode")@QueryParam(value="cpCode")long cpCode,
                                  @WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex,
                                  @WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	/**
	 * 
	* @Title: getThemeMovie
	* @Description: 获取专题影片详情
	* @param movieCode
	* @return 
	* @return GetThemeMovieListResp 
	* @throws
	 */
	@GET
	@Path(value="getThemeMovie")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetThemeMovie",operationName="getThemeMovie")
	GetThemeMovieResp getThemeMovie(@WebParam(name="movieCode")@QueryParam(value="movieCode")String movieCode);
	
	/**
	 * 
	* @Title: getThemeMovieList 
	* @Description: 获取专题影片列表
	* @param themeCode
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetThemeMovieListResp 
	* @throws
	 */
	@GET
	@Path(value="getThemeMovieList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetThemeMovieList",operationName="getThemeMovieList")
    GetThemeMovieListResp getThemeMovieList(@WebParam(name="themeCode")@QueryParam(value="themeCode")String themeCode,
                                            @WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex,
                                            @WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	/**
	 * 
	* @Title: luckySignup 
	* @Description: 报名观影
	* @param movieCode
	* @param productID 产品编码组合，以逗号分割
	* @param userID
	* @param userPhone
	* @return 
	* @return LuckySignupResp 
	* @throws
	 */
	@GET
	@Path(value="luckySignup")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doLuckySignup",operationName="luckySignup")
	LuckySignupResp luckySignup(@WebParam(name="movieCode")@QueryParam(value="movieCode")String movieCode, 
			@WebParam(name="productID")@QueryParam(value="productID")String productID,
			@WebParam(name="userID")@QueryParam(value="userID")String userID,
			@WebParam(name="userPhone")@QueryParam(value="userPhone")String userPhone,
			@WebParam(name="updatePhone")@QueryParam(value="updatePhone")int updatePhone);
	
	/**
	 * 
	* @Title: getThemeUserList 
	* @Description: 获取报名用户
	* @param themeCode
	* @param type 1-报名用户 ；2-未通知用户；3-已通知用户
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetThemeUserListResp 
	* @throws
	 */
	@GET
	@Path(value="getThemeUserList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetThemeUserList",operationName="getThemeUserList")
	GetThemeUserListResp getThemeUserList(@WebParam(name="themeCode")@QueryParam(value="themeCode")String themeCode,
			@WebParam(name="type")@QueryParam(value="type")int type,
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
}

